.lib "bbAddon.dll"

; ------------ Maths ------------
Min#(a#,b#):"_Min@8"
Max#(a#,b#):"_Max@8"
LinearInterp#(a#,b#,rate#):"_LinearInterp@12"
CosInterp#(a#,b#,rate#):"_CosInterp@12"
CubicInterp#(a#,b#,c#,d#,rate#):"_CubicInterp@20"


; ------------ Vector2 ------------
Vector2%(x#,y#):"_NewVector2@8"
DeleteVector2%(v):"_DeleteVector2@4"

SetVector2(v, x#,y#):"_SetVector2@12"
SetVector2X(v, x#):"_SetVector2X@8"
SetVector2Y(v, y#):"_SetVector2Y@8"

Vector2Equal%(v1,v2):"_Vector2Equal@8"

Vector2x#(v):"_Vector2X@4"
Vector2y#(v):"_Vector2Y@4"
Vector2Angle#(v1,v2):"_Vector2Angle@8"
Vector2Mag#(v):"_Vector2Mag@4"
Vector2SquareMag#(v):"_Vector2SquareMag@4"
Vector2Dot#(v1,v2):"_Vector2Dot@8"
Vector2Cross#(v1,v2):"_Vector2Cross@8"

MagVector2#(v):"_MagVector2@4"


; ------------ Events ------------

EmitEvent(Id%,X%,Y%,Data$,Source%):"_EmitEvent@20"
PollEvent%():"_PollEvent@0"
EventID%():"_EventID@0"
EventX%():"_EventX@0"
EventY%():"_EventY@0"
EventSource%():"_EventSource@0"
EventData$():"_EventData@0"

EventEnableStack(Enable%):"_EventEnableStack@4"
EventStackEnabled%():"_EventStackEnabled@0"
SetEventStackSize(size%):"_SetEventStackSize@4"
EventStackSize%():"_EventStackSize@0"
CountEvents%():"_CountEvents@0"


; ------------ Linked-List ------------

DebugCountLinks%():"_DebugCountLinks@0"
NewList%():"_NewList@0"
AddLast%(List,value$):"_ListAddLast@8"
AddFirst%(List,value$):"_ListAddFirst@8"
InsertBefore%(Link,before):"_ListInsertBefore@8"
InsertAfter%(Link,after):"_ListInsertAfter@8"
DeleteList(List):"_DeleteList@4"
DeleteLink(Link):"_DeleteLink@4"
ListContains%(List,Value$):"_ListContains@8"
ListIsEmpty%(List):"_ListIsEmpty@4"
ListFirst%(list):"_FirstLink@4"
ListLast%(list):"_LastLink@4"
AfterLink%(link):"_AfterLink@4"
BeforeLink%(link):"_BeforeLink@4"
LinkValue$(link):"_LinkValue@4"
SetLinkValue(Link,value$):"_SetLinkValue@8"

LinkCompare%(l1,l2):"_LinkCompare@8"
StrCompare%(a$,b$):"_StrCompare@8"
SwapLinks%(link1,link2):"_SwapLinks@8"
SortList%(List,Sens):"_SortList@8"
